package com.cencat.product;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 产品模块启动类
 * @author cencat
 * @since 2024-01-01
 */
@SpringBootApplication
@ComponentScan(basePackages = {"com.cencat.product", "com.cencat.common"})
@MapperScan("com.cencat.product.mapper")
@EnableTransactionManagement
@Slf4j
public class ProductApplication {

    public static void main(String[] args) {
        SpringApplication.run(ProductApplication.class, args);
        
        // 输出启动成功信息
        log.info("\n" +
                "=================================================\n" +
                "🚀 Cencat Product Module Started Successfully!\n" +
                "📖 API Documentation: http://localhost:8082/swagger-ui/index.html\n" +
                "💚 Health Check: http://localhost:8082/actuator/health\n" +
                "=================================================");
    }
}